Skip to content

New package: forgejo-cli-0.4.1#59451

Open
rayfadh wants to merge 1 commit intovoid-linux:masterfrom
rayfadh:forgejo-cli
Open

New package: forgejo-cli-0.4.1#59451
rayfadh wants to merge 1 commit intovoid-linux:masterfrom
rayfadh:forgejo-cli

Conversation

@rayfadh
Copy link
Contributor

@rayfadh rayfadh commented Mar 18, 2026

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x64-glibc

@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 18, 2026

Putting this here first as a draft, I haven't tested it at all. Will update the descriptions after I've done testing.

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Mar 18, 2026
@hosaka
Copy link
Contributor

hosaka commented Mar 19, 2026

Shell completions can be added with something like this in post_install

	for _shell in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/fj completion ${_shell} > forgejo-cli.${_shell}
		vcompletion forgejo-cli.${_shell} ${_shell} fj
	done

@rayfadh rayfadh force-pushed the forgejo-cli branch 4 times, most recently from 98f7e57 to 194bcaf Compare March 19, 2026 12:13
@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 19, 2026

Done. Thanks, @hosaka.

@rayfadh rayfadh marked this pull request as ready for review March 19, 2026 12:19
@Duncaen
Copy link
Member

Duncaen commented Mar 19, 2026

You can workaround the cross build issues with something like this:
#57605 (comment)

@rayfadh rayfadh marked this pull request as draft March 19, 2026 23:21
@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 20, 2026

@Duncaen The cross-build still fails for armv6l, armv7l, and aarch64. The linker can't resolve libgit2, libssh2, libssl, and libcrypto for the cross target. It finds the sysroot libraries but rejects them as incompatible. The _setup_env workaround doesn't seem to help here since the issue is with the linker rather than cc-rs mixing CFLAGS.

Should I restrict the build to x64 and i686 instead? Does that seem reasonable, or is there a better approach for the C dependencies?

@Duncaen
Copy link
Member

Duncaen commented Mar 20, 2026

Looks like the target is x86_64, so it's building it for the host (for some reason, maybe it's executed during the build) which means you have to add those libraries to hostmakedepends too.

@rayfadh rayfadh marked this pull request as ready for review March 20, 2026 13:10
@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 20, 2026

Done :) Thanks

@tranzystorekk
Copy link
Contributor

tranzystorekk commented Mar 20, 2026

those are deps of libgit2, it should suffice to put just libgit2-1.9-devel in hostmakedepends, side note, it seems to be used by the ssh2-config crate to clone the openssh repo for some reason oO

EDIT: veeso/ssh2-config#23 (comment) - "The list of defaults [algorithms] should be the same as in openssh2-portable - and these need to be kept in sync with new releases of openssh-portable" upstream seems to have taken that suggestion a bit too literally...

@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 21, 2026

@tranzystorekk I've changed the hostmakedepends as per your suggestion, the cross-build failed again with the same incompatibility errors. I gotta change it back to explicitly put the rest of the dependencies on hostmakedepends, I guess.

@tranzystorekk
Copy link
Contributor

tranzystorekk commented Mar 21, 2026

seems the cc-rs workaround messes with host build, i managed to get this template to cross build if we choose to downgrade cc instead:

# Template file for 'forgejo-cli'
pkgname=forgejo-cli
version=0.4.1
revision=1
build_style=cargo
build_helper="qemu"
hostmakedepends="pkg-config libgit2-1.9-devel"
makedepends="libgit2-1.9-devel openssl-devel"
short_desc="CLI application for interacting with Forgejo"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="Apache-2.0 OR MIT"
homepage="https://codeberg.org/forgejo-contrib/forgejo-cli"
changelog="https://codeberg.org/forgejo-contrib/forgejo-cli/releases"
distfiles="https://codeberg.org/forgejo-contrib/forgejo-cli/archive/v${version}.tar.gz"
checksum=8f6a93c5f97e45308aead0154d4ec53e672ca90ab0809db543cde6be8078729e

post_patch() {
	cargo update --package cc@1.2.57 --precise 1.2.14
}

post_install() {
	vlicense LICENSE-APACHE
	vlicense LICENSE-MIT

	for _shell in bash fish zsh; do
		vtargetrun ${DESTDIR}/usr/bin/fj completion ${_shell} > fj.${_shell}
		vcompletion fj.${_shell} ${_shell} fj
	done
}

@rayfadh rayfadh force-pushed the forgejo-cli branch 2 times, most recently from bdd16cd to 9d81532 Compare March 21, 2026 14:35
@rayfadh
Copy link
Contributor Author

rayfadh commented Mar 21, 2026

Still failed for armv7l with a gnu/stubs-soft.h: No such file or directory error. I'll just go back to @Duncaen's _setup_env suggestion since that had a passing build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants